[mirrors]
http://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R48.tgz
[main]
filesize=362932
sha512=eea8e7a0dce54692feef165ef6da120e9451e64d6185e7b09bb2f81b5165f8a3dfc090ec748de3a91b7ddbed2562d15664f3dfd9b58bdb8a185ffeca7781d003
tardir=mksh

[deps]

[build]
# cache the current status of "set -e"
case $- in
(*e*)	wasset=1 ;;
(*)	wasset=0 ;;
esac
set -e

CFLAGS='-Os -ftree-dce -fdata-sections -ffunction-sections -Wl,--gc-sections' LDSTATIC=-static LDFLAGS="-Wl,--gc-sections" \
    sh Build.sh -r -M

make -j$MAKE_THREADS -f - all <<'EOF'
include Makefrag.inc
VPATH=		.
all: $(PROG)
$(PROG): $(OBJS_BP)
	+$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_BP) $(LIBS)
$(OBJS_BP): $(SRCS_FP) $(NONSRCS)
.c.o:
	+$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
EOF

strip -s -R .note -R .comment mksh
install -D -m 755 mksh "$butch_install_dir""$butch_prefix"/bin/mksh
install -D -m 644 mksh.1 "$butch_install_dir""$butch_prefix"/share/man/man1/mksh.1

# restore the previous state of set -e
test $wasset = 1 || set +e
